<?php
namespace Core;

require_once __Dir__ . '/../../simpletest/autorun.php';

class TestOfSetUserAsOnline extends \UnitTestCase 
{
	/**
	* Test a correct user online set
	*
	* @reference
	*
	* @requirement
	* @requirement
	*/
    function testCorrectSetUserAsOnline() 
	{
		$services = new CoreService();
		$result = $services->setUserAsOnline(USER_TEST_ID);
		
		$this->assertFalse($result->isFailed);
		$this->assertTrue(isset($result->response));
    }
	
	/**
	* Test an invalid user online set
	*
	* @reference
	*
	* @requirement
	* @requirement
	*/
    function testInvalidSetUserAsOnlineUserNotFound() 
	{
		$services = new CoreService();
		$result = $services->setUserAsOnline(-1);
		
		$this->assertTrue($result->isFailed);
    }
}
?>